/* Copyright (C) 2009 Christofer Jonsson
 *
 * This file is part of FNM.
 *
 * FNM is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * FNM is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
 * License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with FNM.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "fnm_error.h"
#include <stdio.h>
#include <stdarg.h>

void fnm_error_debug(const char *file, unsigned line, const char *format, ...)
{
   va_list args;

   fprintf(stderr, "fnm: ");
   va_start(args, format);
   (void)vfprintf(stderr, format, args);
   va_end(args);
   fprintf(stderr, " [file: %s, line: %u]\n", file, line);
}

void fnm_error(const char *format, ...)
{
   va_list args;

   fprintf(stderr, "fnm: ");
   va_start(args, format);
   (void)vfprintf(stderr, format, args);
   va_end(args);
   fprintf(stderr, "\n");
}
